package com.tushare.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tushare.entity.HkHold;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-03-08
 */
public interface HkHoldMapper extends BaseMapper<HkHold> {

    HkHold getLastHkHold();

    List<HkHold> getHkHoldListByTsCode(@Param("ts_code") String ts_code, @Param("trade_date") int trade_date);

    List<HkHold> getTopHkHoldList(@Param("ts_code") String ts_code, @Param("limit") int limit);

    boolean saveOrUpdateBatch(@Param("list") List<HkHold> list);

    boolean deleteAllHkHold();

}
